package com.methods;

/**
 * 开发工作类
 * 2017-08-13
 * @author Erik
 * @version 1.0
 * @since JDK1.8
 */
public class DevelopmentWork extends Work {
    private int line;
    private int bug;

    @Override
    public void setName(String name)    {   super.setName(name);    }
    public void setBug(int bug)         {   this.bug = bug;         }
    public void setLine(int line)       {   this.line = line;       }

    @Override
    public String getName() {   return super.getName(); }
    public int getBug()     {   return this.bug;        }
    public int getLine()    {   return this.line;       }

    public DevelopmentWork(){}

    /**
     * 三参数构造函数
     * @param line  行数
     * @param bug   bug数
     * @param name  工作名称
     */
    public DevelopmentWork(int line,int bug,String name){
        this.setBug(bug);
        this.setLine(line);
        this.setName(name);
    }

    public String work(){
        String info=this.getName()+"的日报是: 今天编写了"+this.getLine()+"行代码,目前仍有"
                +this.getBug()+"个bug没有解决";
        return info;
    }
}
